import request2 from '@/api/axios2.js';

/**
 * 根据企业查询配置项
 * @param {*} params 
 * @returns 
 */
const pageList = (params) =>{
    return request2({
        url: '/devicePoint/pageList',
        method: 'get',
        params
    })
}

/**
 * 更新信息
 * @param {*} data 
 * @returns 
 */
const updateById = (data)=>{
    return request2({
        url: '/devicePoint/updateById',
        method: 'put',
        data
    })
}
/**
 * 新增信息
 * @param {*} data 
 * @returns 
 */
const saveOrUpdate = (data)=>{
    return request2({
        url: '/devicePoint/saveOrUpdate',
        method: 'post',
        data
    })
}
/**
 * 设备属性快照
 * @param {*} params 
 */
const getList = (params) =>{
    return request2({
        url: '/deviceAttribute/getList',
        method: 'get',
        params
    })
}

const save = (data)=>{
    return request2({
        url: '/devicePoint/save',
        method: 'post',
        data
    })
}

const removeById = (params)=>{
    return request2({
        url: '/devicePoint/removeById',
        method: 'delete',
        params
    })
}

export{
    pageList,
    updateById,
    saveOrUpdate,
    getList,
    save,
    removeById
}
